/*
 * @Author: wwl 2967796480@qq.com
 * @Date: 2023-08-08 08:58:00
 * @LastEditors: wwl 2967796480@qq.com
 * @LastEditTime: 2023-09-14 09:53:50
 * @FilePath: \ConstantBlueCloud_WEB_USER_DZ1 - 副本\src\api\dataCollection.ts
 * @Description: 数据采集配置页面接口
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 */
import Request from '@/libs/request'

/**
 * @description: 查询数据采集配置页面
 * @param {object} data
 * @return {*}
 */
export const uSelectDevDataCollectConf = (data: { userId: string }) => {
  // let reqData = JSON.stringify({
  //   userId: data.userId
  // })
  return Request.post<DataCollection.CollectionDetail[]>(`platFormSubUser/selectDevCollectConf?platFormSubUserId=${ data.userId }`)
}


/**
 * @description: 修改设备采集频率 
 * @param {object} data
 * @return {*}
 */
export const uEditUploadInterval = (data: { devId: number; intervalData: number }) =>
  Request.get<null>('/platFormSubUser/edit/devCollectRate', data)


/**
 * @description: 修改设备上传数据开关
 * @param {object} data
 * @return {*}
 */
export const uSetUpLoadSwitch = (data: { devId: number; isOpen: IsOpen }) =>
  Request.get<null>('/platFormSubUser/editUpLoadSwitch', data)
